# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=imlib2
pkgver=1.7.0
pkgrel=0
pkgdesc="Image manipulation library"
url="https://sourceforge.net/projects/enlightenment"
arch="all"
license="Imlib2"
subpackages="$pkgname-dev"
depends_dev="freetype-dev libxext-dev libsm-dev"
makedepends="$depends_dev tiff-dev giflib-dev bzip2-dev libpng-dev
	libid3tag-dev libjpeg-turbo-dev zlib-dev util-linux-dev libwebp-dev"
source="https://downloads.sourceforge.net/enlightenment/imlib2-$pkgver.tar.gz
	fix-s390x.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/imlib2 \
		--x-libraries=/usr/lib \
		--disable-mmx \
		--disable-amd64 \
		--enable-visibility-hiding \
		--with-x \
		--with-bzip2 \
		--with-gif \
		--with-id3 \
		--with-jpeg \
		--with-png \
		--with-tiff \
		--with-webp \
		--with-zlib
	make
}

check() {
	make check
}

package() {
	make DESTDIR=$pkgdir install
}

sha512sums="97eade309e254c62ef32eac4d18f49c038b9b9c1489f1258a92d2f084a0b53e58b0c80487eb69ecb0da9be23c9deb47f06d6361f18f5b18fa34817871c515e73  imlib2-1.7.0.tar.gz
1ed2636affbf171e8cba969c3959d2d728216dd0250dc6dcc40b6102c0b47290b4fa63acf2f1837c944d8a3c2bf460c848b9ecd30ee094acd0e82ec15022c346  fix-s390x.patch"
